// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/base/api/DeviceDetailApi'

import SelectClass from '@api/base/model/DeviceIotPropertyListReq'

const CLIENT = CORE.grpcCLIENT(Client)

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 下拉框 —————————————————————————————— //

  async getSelect({ deviceId }, TIP = '查询设备点位下拉框') {
    if (!deviceId) return []

    const DTO = CORE.grpcDTO(SelectClass, { deviceId })
    const resp = await CORE.grpc(TIP, CLIENT, 'queryDeviceIotPropertyList', DTO)
    return resp.content || []
  },
}
